﻿<!-- #include file="ding.asp" -->
<!-- #include file="mymin.asp" -->
<%Call Head()%>
<card title="栏目分类删除">
<p>
<%
IF KEY<>0 then
	Call Error("你的权限不足！")
end if
dim rs,sql,lx,id,idd
id=Request.querystring("id")
idd=Request.querystring("idd")
lx=Request.querystring("lx")

Server.ScriptTimeOut=999999

set rs=server.createobject("adodb.recordset")
rs.open "Select * from 74hu_class where classid="&id,myconn,2,3
if not rs.eof then
	rs.delete
	rs.close
	' if lx=3 Then '论坛要删除其中的帖子和回复
		' rs.open "Select * from 74hu_topic where classid="&id,myconn,2,3
		' if not rs.eof then
			' Dim postid
			' While Not rs.eof
				' postid=rs("id")
				' rs.delete
				' myconn.Execute("delete from 74hu_reply Where postid="&postid)
				' rs.movenext
			' Wend
		' end if
		' rs.close
		' Set rs=Nothing
		' Response.Write "论坛栏目(包含其中所有帖子和回复)删除成功!"
	' else
		myconn.Execute("delete from 74hu_class Where parent="&id)
		Response.Write "栏目类别(包含所有子栏目)删除成功!"
	' end if
else
	Response.Write "栏目类别删除失败!栏目不存在或者已删除!"
end if%>
<br/>----------<br/>
<%if idd<>0 then
%>
<a href="Clist.asp?sid=<%=sid%>&amp;id=<%=idd%>">[栏目分类]</a><br/>
<%end if%>
<a href='class.asp?sid=<%=sid%>'>[栏目分类]</a><%call rootLast%>